﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MVCBugTracker;
using MVCBugTracker.Models;

namespace MVCBugTracker.Models
{
    public interface IProjectRepository
    {
        //Projects
        IQueryable<Project> GetAllProjects();
        IQueryable<Project> GetMyProjects(string userName);
        Project GetProject(int projectID);
        void AddProject(Project project);
        void DeleteProject(Project project);

        void Save();

        //Milestones
        IQueryable<ProjectMilestone> GetProjectMilestones(int projectID);
        ProjectMilestone GetProjectMilestone(int milestoneID);
        void AddProjectMilestone(ProjectMilestone milestone);
        void DeleteProjectMilestone(ProjectMilestone milestone);

        //Categories
        IQueryable<ProjectCategory> GetProjectCategories(int projectID);
        ProjectCategory GetProjectCategory(int milestoneID);
        void AddProjectCategory(ProjectCategory category);
        void DeleteProjectCategory(ProjectCategory category);

        //Priorities
        IQueryable<ProjectPriority> GetProjectPriorities(int projectID);
        ProjectPriority GetProjectPriority(int priorityID);
        void AddProjectPriority(ProjectPriority priority);
        void DeleteProjectPriority(ProjectPriority priority);

        //Status
        IQueryable<ProjectStatus> GetProjectStatuses(int projectID);
        ProjectStatus GetProjectStatus(int statusID);
        void AddProjectStatus(ProjectStatus status);
        void DeleteProjectStatus(ProjectStatus status);

        //Custom Fields
        IQueryable<ProjectCustomField> GetProjectCustomFields(int projectID);
        ProjectCustomField GetProjectCustomField(int customFieldID);
        void AddProjectCustomField(ProjectCustomField customField);
        void DeleteProjectCustomField(ProjectCustomField customField);

        //Custom Field Values
        IQueryable<ProjectCustomFieldValue> GetProjectCustomFieldValues(int projectID);
        ProjectCustomFieldValue GetProjectCustomFieldValue(int customFieldID);
        void AddProjectCustomFieldValue(ProjectCustomFieldValue customFieldValue);
        void DeleteProjectCustomFieldValue(ProjectCustomFieldValue customFieldValue);

        //Users
        IQueryable<ProjectMember> GetProjectMembers(int projectID);
        ProjectMember GetProjectMember(int projectID, string userName);
        void AddProjectMember(ProjectMember projectMember);
        void DeleteProjectMember(ProjectMember projectMember);
    }
}
